package com.borrow.service.client.impl;

import com.borrow.service.client.UserClient;
import com.commons.entity.User;
import org.springframework.stereotype.Component;

@Component   //注意，需要将其注册为Bean，Feign才能自动注入
public class UserFallbackClient implements UserClient {
    @Override
    public User apiFindUserById(Integer sid) {
        User user = new User();
        user.setUsername("补救措施");
        return user;
    }
}
